<template>
  <div>
    <div class="title">周末去哪儿</div>
    <ul>
      <li class="item border-bottom" v-for="item of list" :key="item.id">
        <div class="item-img-wrapper">
          <img class="item-img" :src="item.imgUrl" />
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "HomeWeekend",
  props:{
    list: Array
  },
  data() {
    return {
      // list: [
      //   {
      //     id: "001",
      //     title: "AAAhahahhahhahahahahhahahahahahh",
      //     desc:
      //       "哈哈哈哈啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或",
      //     imgUrl:
      //       "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1594826520535&di=9e7318b490fb9189a111b941ad0868dc&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201701%2F16%2F20170116105642_a3EXe.jpeg"
      //   },
      //   {
      //     id: "002",
      //     title: "AAAhahahhahhahahahahhahahahahahh",
      //     desc:
      //       "哈哈哈哈啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或",
      //     imgUrl:
      //       "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1594826520535&di=df6c4190346b318050a09885c5bd7874&imgtype=0&src=http%3A%2F%2Fbos.pgzs.com%2Frbpiczy%2FWallpaper%2F2013%2F10%2F8%2F02404ff49fee4263ba88311605c47608.jpg"
      //   },
      //   {
      //     id: "003",
      //     title: "AAAhahahhahhahahahahhahahahahahh",
      //     desc:
      //       "哈哈哈哈啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或",
      //     imgUrl:
      //       "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1594826520535&di=9e7318b490fb9189a111b941ad0868dc&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201701%2F16%2F20170116105642_a3EXe.jpeg"
      //   },
      //   {
      //     id: "004",
      //     title: "AAAhahahhahhahahahahhahahahahahh",
      //     desc:
      //       "哈哈哈哈啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或",
      //     imgUrl:
      //       "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1594826521464&di=ad9cefe720f312970f918e8f2b4e49a0&imgtype=0&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fzhidao%2Fpic%2Fitem%2Fd50735fae6cd7b89a6c4a5d60d2442a7d9330e3e.jpg"
      //   },
      //   {
      //     id: "005",
      //     title: "AAAhahahhahhahahahahhahahahahahh",
      //     desc:
      //       "哈哈哈哈啊哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或",
      //     imgUrl:
      //       "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1594826520535&di=df6c4190346b318050a09885c5bd7874&imgtype=0&src=http%3A%2F%2Fbos.pgzs.com%2Frbpiczy%2FWallpaper%2F2013%2F10%2F8%2F02404ff49fee4263ba88311605c47608.jpg"
      //   }
      // ]
    };
  }
};
</script>

<style lang="stylus" scoped>
  @import '~styles/mixins.styl'
  .title
    line-height: .8rem
    background: #eee
    text-indent: .2rem
  .item-img-wrapper
    overflow: hidden
    height: 0
    padding-bottom: 37.09%
    .item-img
      width: 100%
  .item-info
    padding: .1rem
    .item-title
      line-height: .54rem
      font-size: .32rem
      ellipsis()
    .item-desc
      line-height: .4rem
      color: #ccc
      ellipsis()
</style>
